﻿@model ArchiveViewModel
@{
    Layout = null;
    ViewBag.Title = "卷内目录";
}
@using (Html.BeginForm("VolumeListUpdate", "Archive", null, FormMethod.Post, new { onsubmit = "return validateCallback(this,dialogRefresh);", @class = "pageForm required-validate" }))
{
    <div class="pageFormContent sortDrag" layouth="57" style="background: #f9fcfe">
        <div style="float: left;">
            <a class="add" href="@Url.Action("VolumeList", "Archive", new { type = ViewBag.Type, pftId = ViewBag.PftId, flId = Model.TheBcdFilelistInfo.Fl_ID })" mask="true" target="dialog" width="700" height="400" rel="dialog_fileList">
                <button type="button" class="btn btn-min">添加归档材料</button></a>
        </div>
        <div style="font-family: 宋体; margin-left: 300px; font-size: large; font-weight: bold;">卷&nbsp;&nbsp;&nbsp;内&nbsp;&nbsp;&nbsp;目&nbsp;&nbsp;&nbsp;录 </div>
        <div style="text-align: right; height: 22px;">档号：@(Model.TheBcdFilelistInfo.Fl_Code)-@(Model.TheBcdFilelistInfo.Fl_Numb.ToString("D3"))</div>
        <div id="div_VolumeDirectoryList">
            @{Html.RenderAction("VolumedirectoryList", "Archive", new { id = Model.TheBcdFilelistInfo.Fl_ID, type = ViewBag.Type, pftId = ViewBag.PftId });}
        </div>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <button type="submit" class="btn btn-sm">保存</button>
            </li>
            <li>
                <button type="button" class="close btn btn-default btn-sm">关闭</button>
            </li>
        </ul>
    </div>
}
<script type="text/javascript">
    function fileVolumeAdd(json) {
        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            refre_jgzl_cllx_index(json);
            $("#div_VolumeDirectoryList").loadUrl('/CompletionMaterials/Archive/VolumedirectoryList', "id=@(Model.TheBcdFilelistInfo.Fl_ID)", null);
            $("#jgzl_cllx_list_@(ViewBag.Type)").loadUrl('/CompletionMaterials/ProFileType/Detail', "tab_i=1&type=@(ViewBag.Type)&id=@(ViewBag.PftId)", function (message) {
                $('#jgzl_cllx_list_@(ViewBag.Type)').parent().find("[layoutH]").layoutH();
            });
            $.pdialog.closeCurrent();
        }
    }
    function volumeDel(json) {
        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            refre_jgzl_cllx_index(json);
            $("#div_VolumeDirectoryList").loadUrl('/CompletionMaterials/Archive/VolumedirectoryList', "id=@(Model.TheBcdFilelistInfo.Fl_ID)", null);
            $("#jgzl_cllx_list_@(ViewBag.Type)").loadUrl('/CompletionMaterials/ProFileType/Detail', "tab_i=1&type=@(ViewBag.Type)&id=@(ViewBag.PftId)", function (message) {
                $('#jgzl_cllx_list_@(ViewBag.Type)').parent().find("[layoutH]").layoutH();
            });
        }
    }
    function volumeSplit(json) {
        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            refre_jgzl_cllx_index(json);
            $("#div_VolumeDirectoryList").loadUrl('/CompletionMaterials/Archive/VolumedirectoryList', "id=@(Model.TheBcdFilelistInfo.Fl_ID)", null);
            $("#jgzl_cllx_list_@(ViewBag.Type)").loadUrl('/CompletionMaterials/ProFileType/Detail', "tab_i=1&type=@(ViewBag.Type)&id=@(ViewBag.PftId)", function (message) {
                $('#jgzl_cllx_list_@(ViewBag.Type)').parent().find("[layoutH]").layoutH();
            });

        }
    }
    function dialogRefresh(json) {
        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            $.pdialog.closeCurrent();
        }
    }
</script>
